local skynet = require "skynet"


local function main()	

	-- 加载协议并设置共享
	skynet.uniqueservice("common/proto", "./server/conf/proto.conf")
	
	-- 测试登录 
	local mgr = skynet.newservice("login/watchdog")

	-- 数据库连接数据
	skynet.call(mgr,"lua", "init", {
		host 		= "127.0.0.1",
		port 		= 3306,
		basename 	= "Account",
		user 		= "root",
		pawd 		= "123123"
	})

	-- 开启监听端口(linux -> poll)
	skynet.call(mgr, "lua", "start",{
		address 	= "0.0.0.0",
		port 		= 6090,
		maxclient	= 64,
		nodelay 	= true,	
	})
                               
	skynet.error("登录服务器开启")
	
	-- 移除服务
	skynet.exit()		
end 

skynet.start(main)
